gdouble *yoffset,
gdouble *blur,
gdouble *spread,
- gboolean *inset)
+ gboolean *inset,
+ gboolean *is_none)
{
GetFromTermResult result;
CRTerm *term;
int n_offsets = 0;
+ *is_none = FALSE;
/* default values */
color->red = 0x0; color->green = 0x0; color->blue = 0x0; color->alpha = 0xff;
for (term = decl->value; term; term = term->next)
{
/* if we found "none", we're all set with the default values */
- if (term_is_none (term))
+ if (term_is_none (term)) {
+ *is_none = TRUE;
return VALUE_FOUND;
+ }
if (term->type == TERM_NUMBER)
{
* See also st_theme_node_get_shadow(), which provides a simpler API.
*
* Return value: %TRUE if the property was found in the properties for this
- * theme node (or in the properties of parent nodes when inheriting.)
+ * theme node (or in the properties of parent nodes when inheriting.), %FALSE
+ * if the property was not found, or was explicitly set to 'none'.
*/
gboolean
st_theme_node_lookup_shadow (StThemeNode *node,
gdouble blur = 0.;
gdouble spread = 0.;
gboolean inset = FALSE;
+ gboolean is_none = FALSE;
int i;
&yoffset,
&blur,
&spread,
- &inset);
+ &inset,
+ &is_none);
if (result == VALUE_FOUND)
{
+ if (is_none)
+ return FALSE;
+
*shadow = st_shadow_new (&color,
xoffset, yoffset,
blur, spread,